package com.example.demo.properties;

/**
 * @author qinbo
 * @version 1.0
 * @description: TODO
 * @date 2025/2/11 7:20
 */

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

@Data

@ConfigurationProperties(prefix = "spring.ai.ollama")
public class OllamaProperties {
    private String baseUrl;
    private Chat chat = new Chat();

    public String getBaseUrl() {
        return baseUrl;
    }

    public void setBaseUrl(String baseUrl) {
        this.baseUrl = baseUrl;
    }

    public Chat getChat() {
        return chat;
    }

    public void setChat(Chat chat) {
        this.chat = chat;
    }

    @Data
    public static class Chat {
        private boolean enabled;
        private String model;
        private Map<String, Object> options = new HashMap<>();

        public boolean isEnabled() {
            return enabled;
        }

        public void setEnabled(boolean enabled) {
            this.enabled = enabled;
        }

        public String getModel() {
            return model;
        }

        public void setModel(String model) {
            this.model = model;
        }

        public Map<String, Object> getOptions() {
            return options;
        }

        public void setOptions(Map<String, Object> options) {
            this.options = options;
        }
    }
}
